import { useSelector, useDispatch } from "react-redux";
// 导入actionCreater
import { inscrement, decscrement } from "./store/model/counterStore.js";

function App() {
  const { count } = useSelector(state => state.counter)
  const dispatch = useDispatch()
  return (
    <>
      <button onClick={() => dispatch(decscrement())}>-</button>
      {count}
      <button onClick={() => dispatch(inscrement())}>+</button>
    </>
  )
}

export default App